home *** CD-ROM | disk | FTP | other *** search
- /* */
- /*
- showmodule module
- */
- OPTIONS RESULTS
-
- show='sys:AMIGAE/showmodule'
-
- LIBS.dos = '00 00 00 00'x
- LIBS.dos.OPENCOUNT = 0
- LIBS.dos.Open='FFE2'x||SI||'200203'x
- LIBS.dos.Close='FFDC'x||A||'2002'x
- LIBS.dos.Execute='FF22'x||SAA||'20020304'x
- LIBS.dos.SystemTagList='FDA2'x||SS||'200203'x
-
- SYS_Dummy='80000020'x
- SYS_Input='80000021'x
- SYS_Output='80000022'x
- SYS_Asynch='80000023'x
- SYS_UserShell='80000024'x
- SYS_CustomShell='80000025'x
-
- IF ~SHOW('L','rexxsupport.library') THEN CALL ADDLIB('rexxsupport.library',0,-30,0)
- IF ~SHOW('L','rxgen.library') THEN CALL ADDLIB('rxgen.library',0,-30,0)
-
- call GenOpenLib("dos",0)
-
- ih=GenACall("dos","Open","NULL:",1005)
- IF ih=NULL() THEN GOTO finish
- oh=GenACall("dos","Open","NULL:",1006)
- IF oh=NULL() THEN GOTO finish
-
- GETFILENAME 'EMODULES:mods/' 'select E module'
- t=RESULT
- IF t='RESULT' THEN EXIT 0
- PARSE VAR t modpath'.m'
- t=modpath
- PARSE VAR t modpath'.e'
-
- c=POS(':',modpath)
- txtpath='RAM:emodules/'||SUBSTR(modpath,c+1)
- IF EXISTS(txtpath'.txt')=0 THEN DO
- CALL MakePath(txtpath)
- /*
- CALL DoShell('AMIGAE:BIN/showmodule >'txtpath'.txt 'modpath'.m')
- */
- CALL DoShell(show '>'txtpath'.txt 'modpath'.m')
- END
-
- OPEN NEW
- OPEN txtpath'.txt'
-
- finish:
- IF ih~=NULL() THEN call GenACall("dos","Close",ih)
- IF oh~=NULL() THEN call GenACall("dos","Close",oh)
- call GenCloseLib("dos")
- EXIT
-
- DoShell:
- PARSE ARG cmd
- r=GenACall("dos","SystemTagList",cmd||NULL(),SYS_Input||ih||SYS_Output||oh||NULL())
- RETURN r
-
- MakePath:
- PARSE ARG path
- c=POS(':',path)+1
- s=POS('/',path,c)
- DO WHILE s~=0
- dir=LEFT(path,s-1)
- CALL DoShell('sys:c/makedir 'dir)
- t=s+1
- s=POS('/',path,t)
- END
- RETURN
-